﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/App.Master" Inherits="System.Web.Mvc.ViewPage<Ornament.MemberShip.User>" %>
<%@ Import Namespace="Ornament.Web" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%=Html.GetResourceString("title_editUser")%>:
    <%=Model.LoginId %>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PageTitle" runat="server">
    <%=Html.GetResourceString("title_editUser")%>:
    <%=Model.LoginId %>
    <%Html.BeginForm();%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <input id="submitButton" type="submit" value="<%=Resources.Basic.Save %>" />
        <input id="cancelButton" type="button" value="<%=Resources.Basic.Cancel%>" />
    </p>
    <input type="hidden" name="Id" value="<%=Model.Id %>" />
    <div id="first">
        <ul>
            <li><a href="#editUser"><%=Html.GetResourceString("tab_userInfo")%></a></li>
            <li><a href="#permissions"><%=Html.GetResourceString("tab_permission")%></a></li>
            <li><a href="#anotherInfo"><%=Html.GetResourceString("tab_anotherInfo")%></a></li>
        </ul>
        <div id="editUser" class="cssform" style="width: 550px">
            <p>
                <%=Html.LabelFor(model=>model.Name)%>
                <%=Html.TextBoxFor(model=>model.Name)%>
                <%=Html.ValidationMessageFor(model=>model.Name) %>
            </p>
            <p>
                <%=Html.LabelFor(model => model.Information.Email)%>
                <%=Html.TextBoxFor(model=>model.Information.Email)%>
                <%=Html.ValidationMessageFor(model=>model.Information.Email) %>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.Information.Phone)%>
                <%=Html.TextBoxFor(model=>model.Information.Phone)%>
                <%=Html.ValidationMessageFor(model=>model.Information.Phone) %>
            </p>
            <p>
                <%=Html.LabelFor(model => model.Remark)%>
                <%=Html.TextAreaFor(model => model.Remark)%>
                <%=Html.ValidationMessageFor(model=>model.Remark) %>
            </p>
            <p>
                <%=Html.LabelFor(model => model.IsApproved)%>
                <%=Html.CheckBoxFor(model => model.IsApproved)%>
            </p>
            <p>
              <%=Html.LabelFor(model => model.IsLockout)%>
                <%=Html.CheckBoxFor(model => model.IsLockout)%>
            </p>
        </div>
        <div id="permissions">
            <%foreach (var per
                  in Model.Permissions)
              {
            %>
            <p>
                <label title="<%=per.Remark%>">
                    <%=per.Name %></label></p>
            <%
              }%>
        </div>
        <div id="anotherInfo" class="cssform">
            <p>
                <%=Html.LabelFor(model=>model.UpdateTime)%>
                <label id="UpdateTime" class="data">
                    <%=Model.UpdateTime%>
                </label>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.CreateTime)%>
                <label id="CreateTime" class="data">
                    <%=Model.CreateTime%>
                </label>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.LastPasswordChangedDate)%>
                <label id="LastPasswordChangedDate" class="data">
                    <%=Model.LastPasswordChangedDate%>
                </label>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.LastLockoutDate)%>
                <label id="LastLockoutDate" class="data">
                    <%=Model.LastLockoutDate%>
                </label>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.LastLoginDate)%>
                <label id="LastLoginDate" class="data">
                    <%=Model.LastLoginDate%>
                </label>
            </p>
            <p>
                <%=Html.LabelFor(model=>model.LastActivityDate)%>
                <label id="LastActivityDate" class="data">
                    <%=Model.LastActivityDate%>
                </label>
            </p>
        </div>
    </div>
    <%Html.EndForm(); %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="<%=Url.Content("~/Scripts/lib/jQuery.easyValidate.js") %>" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#first").tabs();
            $("#submitButton").button();
            $('#cancelButton').button().click(function () { location = '<%=this.Url.Action("Index")%>' });
        });

    </script>
</asp:Content>
